package dp.gr03.payroll.generalTransactions;

import dp.gr03.payroll.classifications.CommissionedClassification;
import dp.gr03.payroll.payrollDomain.PaymentClassification;
import dp.gr03.payroll.payrollDomain.PaymentSchedule;
import dp.gr03.payroll.schedules.BiweeklySchedule;

public class AddCommissionedEmployee extends AddEmployeeTransaction
{

    protected double salary;
    protected double commissionRate;

    public AddCommissionedEmployee(int id, String name, String address, double salary, double commissionRate)
    {
        super(id, name, address);
        this.salary = salary;
        this.commissionRate = commissionRate;
    }

    @Override
    protected PaymentSchedule getPaymentSchedule()
    {
        return new BiweeklySchedule();
    }

    @Override
    protected PaymentClassification getClassification()
    {
        return new CommissionedClassification(salary, commissionRate);
    }

}
